package com.cskaoyan.catmall.service.Impl;

import com.cskaoyan.catmall.dao.MarketFeedbackMapper;
import com.cskaoyan.catmall.model.bo.FeedbackBo;
import com.cskaoyan.catmall.model.pojo.MarketFeedback;
import com.cskaoyan.catmall.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * 反馈
 * 创建日期: 2022/01/11 21:47
 *
 * @author ghr
 */
@Service
public class FeedbackServiceImpl implements FeedbackService {
    @Autowired
    MarketFeedbackMapper marketFeedbackMapper;

    @Override
    public void insert(FeedbackBo feedbackBo) {
        MarketFeedback marketFeedback = new MarketFeedback();
        marketFeedback.setContent(feedbackBo.getContent());
        marketFeedback.setFeedType(feedbackBo.getFeedType());
        marketFeedback.setHasPicture(feedbackBo.getHasPicture());
        marketFeedback.setMobile(feedbackBo.getMobile());
        marketFeedback.setPicUrls(marketFeedback.getPicUrls());
        marketFeedback.setAddTime(new Date());
        marketFeedback.setUpdateTime(new Date());
        marketFeedbackMapper.insertSelective(marketFeedback);
    }
}